<?php

namespace App\Http\Requests\BackendApi;

use Illuminate\Foundation\Http\FormRequest;

class GalleryRequest extends FormRequest
{
    /**
     * Determine if the user is authorized to make this request.
     *
     * @return bool
     */
    public function authorize()
    {
        return true;
    }

    /**
     * Get the validation rules that apply to the request.
     *
     * @return array
     */
    public function rules()
    {
        return [
            'title' => 'required',
            'image_type' => 'required',
//            'shuffling_images' => 'required',
        ];
    }

    public function messages()
    {
        return [
            'title.required' => '标题不能为空',
            'image_type.required' => '图片类型不能为空',
//            'shuffling_images.required' => '图片路径不能为空',
        ];
    }
}
